import os
import argparse
from .pipeline import rebuild_ui


def main():
    parser = argparse.ArgumentParser(description="Rebuild UI positions from effect image and assets")
    parser.add_argument("--effect", default=os.path.join("资源", "效果图-设置界面.jpg"), help="Path to effect image")
    parser.add_argument("--assets", default="资源", help="Directory containing scatter assets")
    parser.add_argument("--out", default=os.path.join("ui_out"), help="Output directory")
    args = parser.parse_args()

    result = rebuild_ui(args.effect, args.assets, args.out)
    print("输出:")
    for k, v in result.items():
        print(f"  {k}: {os.path.abspath(v)}")


if __name__ == "__main__":
    main()


